#!/bin/bash

# 说明：将全新的BOX搞污
# 具体需要执行的内容参看README.md

MOUNT_PATH=/media/disk/sda8

cp mountboxdata /etc/init.d
chmod +x /etc/init.d/mountboxdata
# systemctl怎么安装服务？

if ! [ -d $MOUNT_PATH/data ]; then
    mkdir $MOUNT_PATH/data
fi

if ! [ -e /data ]; then
    ln -s $MOUNT_PATH/data /
fi

WWW_ROOT=$MOUNT_PATH/data/www
if ! [ -d $WWW_ROOT ]; then
    mkdir $WWW_ROOT
fi